package com.es.core.controller;

import com.es.core.service.RabbitMQService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:
 * Old-AgeCareSystem-
 *
 * @author Derek
 * @create 2021-12-09 9:54
 */
@RestController
@RequestMapping("/rabbit")
public class RabbitMQController {

    @Autowired
    private RabbitMQService service;

    @RequestMapping("/send")
    public String sendMessage(String message){
        return service.sendMessage(message);
    }

    @RequestMapping("/sendByExchange")
    public String sendMessage(String exchangeName,String routingKey,String message){
        return service.sendMessage(exchangeName,routingKey,message);
    }
}
